package org.yzhang3.data.bean;

public class LzwBean {

	private String currentSequence;
	private char nextChar;
	private String bits;
	private int index;

	public LzwBean() {
		
	}

	public LzwBean(String bits) {
		this.bits = bits;
	}

	public LzwBean(String currentSequence, char nextChar, String bits) {
		this.currentSequence = currentSequence;
		this.nextChar = nextChar;
		this.bits = bits;
	}

	public LzwBean(String currentSequence, char nextChar, String bits, int index) {
		super();
		this.currentSequence = currentSequence;
		this.nextChar = nextChar;
		this.bits = bits;
		this.index = index;
	}

	public String getCurrentSequence() {
		return currentSequence;
	}

	public void setCurrentSequence(String currentSequence) {
		this.currentSequence = currentSequence;
	}

	public char getNextChar() {
		return nextChar;
	}

	public void setNextChar(char nextChar) {
		this.nextChar = nextChar;
	}

	public String getBits() {
		return bits;
	}

	public void setBits(String bits) {
		this.bits = bits;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((currentSequence == null) ? 0 : currentSequence.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		LzwBean other = (LzwBean) obj;
		if (currentSequence == null) {
			if (other.currentSequence != null)
				return false;
		} else if (!currentSequence.equals(other.currentSequence))
			return false;
		return true;
	}

}
